/**
 * 选择客户的客户列表
 */
(function($){
	$.fn.customerselect = function(options){
		options = options || {};
		return this.each(function(){
			var opts = $.extend({
				panelWidth:500,
				idField:'custId',
				textField:'custName',
				mode:'remote',
				pagination:true,
				fit:true,
				fitColumns:true,
				columns:[[
				      {field:'custId',title:'客户ID',width:60,hidden:true},
					  {field:'custCode',title:'客户编号',width:60},
					  {field:'custName',title:'客户名称',width:150},
					  {field:'phone',title:'电话',width:160},
					  {field:'linkman',title:'联系人',width:60}
				]]
			}, options);
			
			$(this).combogrid(opts);
		});
	};
})(jQuery);